Skip to content

Don't append display name suffix to data table file keys#7104

Merged
jkschneider merged 1 commit intomainfrom
fix/data-table-filekey-no-spurious-suffix
Mar 23, 2026
Merged

Don't append display name suffix to data table file keys#7104
jkschneider merged 1 commit intomainfrom
fix/data-table-filekey-no-spurious-suffix

Conversation

@jkschneider
Copy link
Copy Markdown
Member

Summary

  • CsvDataTableStore.fileKey() was always appending a sanitized suffix from the data table's display name (e.g. RecipeRunStats--recipe-performance-c5de), even when no custom instance name was set and no disambiguation was needed.
  • Now only adds a suffix when the instance name was explicitly customized via withInstanceName(), or when a group is set. Plain data tables get a clean key like org.openrewrite.table.RecipeRunStats.

Test plan

  • Added fileKeyNoSuffixWhenInstanceNameNotCustomized — verifies bare name when no customization
  • Added fileKeySuffixWhenInstanceNameCustomized — verifies suffix present with withInstanceName()
  • Added fileKeySuffixFromGroup — verifies suffix present with withGroup()
  • All existing DataTableStoreTest tests pass

`CsvDataTableStore.fileKey()` always appended a sanitized suffix derived
from `getInstanceName()`, which defaults to the display name. This meant
every data table got a suffix like `--recipe-performance-c5de` even when
no custom instance name was set and no disambiguation was needed.

Now, when no group is set, a suffix is only added when the instance name
was explicitly customized via `withInstanceName()` (i.e. differs from
the default display name). Plain data tables like `RecipeRunStats` get a
clean key: `org.openrewrite.table.RecipeRunStats`.
@github-project-automation github-project-automation Bot moved this to In Progress in OpenRewrite Mar 23, 2026
@jkschneider jkschneider merged commit 9a5ad4c into main Mar 23, 2026
1 check passed
@jkschneider jkschneider deleted the fix/data-table-filekey-no-spurious-suffix branch March 23, 2026 20:47
@github-project-automation github-project-automation Bot moved this from In Progress to Done in OpenRewrite Mar 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

1 participant